package com.zzyl.nursing.job;

import com.zzyl.nursing.service.IContractService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 合同相关定时任务类
 * 用于定时更新合同状态
 */
@Slf4j
@Component("contractJob") //标识为Spring管理的组件（Bean），并指定名称
public class ContractJob {

    @Autowired
    private IContractService contractService;

    //定时更新合同状态
    public void updateContractStatusJob() {
        contractService.updateContractStatus();
        log.info("定时更新合同状态成功！");
    }
}